/* ==== v-count ==== */

.v-count {
  display: inline-block;
  width: 180px;
  position: relative;
  line-height: normal;

  &:hover {
    .v-count__increase, .v-count__decrease {
      opacity: 1;
    }
  }

  .v-input {
    display: block;
  }
  .v-input__inner {
    appearance: none;
    padding-right: @input-height / 2 + 10;
  }
  &__increase, &__decrease {
    border-left: @border-base;
    width: @input-height / 2 + 10px;
    line-height: @input-height / 2 - 1px;
    text-align: center;
    color: @light-silver;
    cursor: pointer;
    position: absolute;
    top: 1px;
    right: 1px;
    z-index: 1;
    font-size: 12px;
    opacity: 0;
    transition: @all-transition;
    &:hover {
      color: @color-primary;

      &:not(.is-disabled) ~ .v-input .v-input__inner:not(.is-disabled) {
        border-color: @color-primary;
      }
    }

    &.is-disabled {
      color: @disabled-border-base;
      cursor: not-allowed;
    }
  }

  &__increase {
    height: @input-height / 2 - 1px;
    border-bottom: @border-base;
    background: url("~@/vuego/assets/packup.png") center center no-repeat;
    background-size: 12px 12px;
    &:hover {
      background: url("~@/vuego/assets/packup-hover.png") center center no-repeat;
      background-size: 12px 12px;
    }
  }
  &__decrease {
    height: @input-height / 2;
    top: @input-height / 2 - 1px;
    background: url("~@/vuego/assets/unfold.png") center center no-repeat;
    background-size: 12px 12px;
    &:hover {
      background: url("~@/vuego/assets/unfold-hover.png") center center no-repeat;
      background-size: 12px 12px;
    }
  }

  &.is-disabled {
    &:hover {
      .v-count__increase, .v-count__decrease {
        opacity: 0;
        cursor: not-allowed;
        &:hover {
          &:not(.is-disabled) ~ .v-input .v-input__inner:not(.is-disabled) {
            border-color: @disabled-border-base;
          }
        }
      }
    }
  }
  &--large {
    width: 200px;

    .v-count__increase, .v-count__decrease {
      line-height: @input-large-height / 2 - 1px;
      width: @input-large-height / 2 + 10px;
      font-size: @input-large-font-size;
    }
    .v-count__increase {
      height: @input-large-height / 2 - 1px;
      background: url("~@/vuego/assets/packup.png") center center no-repeat;
      background-size: 15px 15px;
      &:hover {
        background: url("~@/vuego/assets/packup-hover.png") center center no-repeat;
        background-size: 15px 15px;
      }
    }
    .v-count__decrease {
      height: @input-large-height / 2;
      top: @input-large-height / 2 - 1px;
      background: url("~@/vuego/assets/unfold.png") center center no-repeat;
      background-size: 15px 15px;
      &:hover {
        background: url("~@/vuego/assets/unfold-hover.png") center center no-repeat;
        background-size: 15px 15px;
      }
    }
    .v-input__inner {
      padding-right: @input-large-height / 2 + 10;
    }
  }
  &--small {
    width: 130px;

    .v-count__increase, .v-count__decrease {
      line-height: @input-small-height / 2 - 1px;
      width: @input-small-height / 2 + 10px;
      font-size: @input-small-font-size;
    }
    .v-count__increase {
      height: @input-small-height / 2 - 1px;
      background: url("~@/vuego/assets/packup.png") center center no-repeat;
      background-size: 11px 11px;
      &:hover {
        background: url("~@/vuego/assets/packup-hover.png") center center no-repeat;
        background-size: 11px 11px;
      }
    }
    .v-count__decrease {
      height: @input-small-height / 2;
      top: @input-small-height / 2 - 1px;
      background: url("~@/vuego/assets/unfold.png") center center no-repeat;
      background-size: 11px 11px;
      &:hover {
        background: url("~@/vuego/assets/unfold-hover.png") center center no-repeat;
        background-size: 11px 11px;
      }
    }
    .v-input__inner {
      padding-right: @input-small-height / 2 + 10;
    }
  }
  &.is-without-controls {
    .v-input__inner {
      padding-right: 10px;
    }
  }
}
